RepositionWindow Constants
To specify the factors that determine how a window should be positioned, you supply one of the following
WindowPositionMethod
constants to the function
RepositionWindow
or in the
BasicWindowDescription
structure of a resource of type
'wind'
. Do not confuse the
WindowPositionMethod
constants with the pre-Mac OS 8.5 Window Manager window positioning constants or use the
WindowPositionMethod
constants where the older constants are required (such as in the
StandardAlert
function or in
'WIND'
,
'DLOG'
, or
'ALRT'
resources).
enum {
kWindowCenterOnMainScreen = 0x00000001,
kWindowCenterOnParentWindow = 0x00000002,
kWindowCenterOnParentWindowScreen = 0x00000003,
kWindowCascadeOnMainScreen = 0x00000004,
kWindowCascadeOnParentWindow = 0x00000005,
kWindowCascadeOnParentWindowScreen = 0x00000006,
kWindowAlertPositionOnMainScreen = 0x00000007,
kWindowAlertPositionOnParentWindow = 0x00000008,
kWindowAlertPositionOnParentWindowScreen = 0x00000009
};
typedef UInt32 WindowPositionMethod;
Constant descriptions
-
kWindowCenterOnMainScreen
-
Center the window, both horizontally and vertically, on the screen that contains the menu bar.
-
kWindowCenterOnParentWindow
-
Center the window, both horizontally and vertically, on the parent window. If the window to be centered is wider than the parent window, its left edge is aligned with the parent window's left edge.
-
kWindowCenterOnParentWindowScreen
-
Center the window, both horizontally and vertically, on the screen containing the parent window.
-
kWindowCascadeOnMainScreen
-
Place the window just below the menu bar at the left edge of the main screen. Subsequent windows are placed on the screen relative to the first window, such that the frame of the preceding window remains visible behind the current window. The exact amount by which windows are offset depends upon the dimensions of the window frame under a given appearance.
-
kWindowCascadeOnParentWindow
-
Place the window a distance below and to the right of the upper-left corner of the parent window such that the frame of the parent window remains visible behind the current window. The exact amount by which windows are offset depends upon the dimensions of the window frame under a given appearance.
-
kWindowCascadeOnParentWindowScreen
-
Place the window just below the menu bar at the left edge of the screen containing the parent window. Subsequent windows are placed on the screen relative to the first window, such that the frame of the preceding window remains visible behind the current window. The exact amount by which windows are offset depends upon the dimensions of the window frame under a given appearance.
-
kWindowAlertPositionOnMainScreen
-
Center the window horizontally and position it vertically on the screen that contains the menu bar, such that about one-fifth of the screen is above it.
-
kWindowAlertPositionOnParentWindow
-
Center the window horizontally and position it vertically such that about one-fifth of the parent window is above it.
-
kWindowAlertPositionOnParentWindowScreen
-
Center the window horizontally and position it vertically such that about one-fifth of the screen containing the parent window is above it.
© 1999 Apple Computer, Inc. – (Last Updated 18 March 99)